//
//  HMTableView.m
//  wangpaike
//
//  Created by MacBook on 2018/12/7.
//  Copyright © 2018年 HomNee. All rights reserved.
//

#import "HMTableView.h"

@implementation HMTableView

-(instancetype)init{
    if (self == [super init]) {
        [self setUp];
    }
    return self;
}

-(instancetype)initWithCoder:(NSCoder *)aDecoder{
    if (self == [super initWithCoder:aDecoder]) {
        [self setUp];
    }
    return self;
}

-(instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style{
    if (self == [super initWithFrame:frame style:style]) {
        [self setUp];
    }
    return self;
}

-(void)setUp{
    self.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
    if (@available(iOS 11.0, *)) {
        [self setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
        self.estimatedRowHeight = 0;
        self.estimatedSectionHeaderHeight = 0;
        self.estimatedSectionFooterHeight = 0;
        //        if (IPHONEX) {
        //            self.contentInset = UIEdgeInsetsMake(0, 0, 20, 0);
        //        }
    } else {
        // Fallback on earlier versions
    }
}

@end
